import {useState} from 'react'
import { useNavigate } from 'react-router-dom';
import './index.less'
import qqImg from '@/img/qq.png'
function QHeader() {
    const [leftMenu,setLeftMenu] = useState([
        { id: 1, text: '首页' }, 
        { id: 2, text: '下载' }
      ]);
    return (
        <div className="q-header flex">
            <div className='left flex flex-center'>
                <div className='flex flex-center'>
                    <img className='qq-icon' src={qqImg} alt="qq"/>
                    <span>QQ</span>
                </div>
                {
                    leftMenu.map(item => (
                        <div className='pointer menu-item' key={item.id}>{item.text}</div>
                    ))
                }
            </div>
        </div>
    )
}
function useJump() {
    const navigate = useNavigate();
    return () => navigate('/list1');
}


export default QHeader;